package com.chem.search.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;
import java.io.Serializable;

/**
 * 短文信息表(ShortPage)实体类
 *
 * @author makejava
 * @since 2023-09-14 21:27:21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("short_page")
@Document(indexName = "short_page")
public class ShortPage implements Serializable {
    private static final long serialVersionUID = -82934792691047122L;
    /**
     * 短文id
     */
    @Id
    private Integer id;
    /**
     * 短文类型
     */
    @Field(type = FieldType.Text)
    private String type;

    @Field(type = FieldType.Text)
    private String flag;
    /**
     * 短文内容
     */
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String content;


    /**
     * 短文获取状态
     */
    @Field(type = FieldType.Keyword)
    private String msg;
    /**
     * 获取时间
     */
    @Field(type = FieldType.Date)
    private Date time;
    /**
     * 短文接口路径
     */
    @Field(type = FieldType.Text)
    private String url;


}

